package com.kichina.galaxy.dev.tools.controller;

import com.kichina.galaxy.dev.tools.controller.base.DataResponse;
import com.kichina.galaxy.dev.tools.controller.handler.AutoProductAddHandler;
import com.kichina.galaxy.dev.tools.model.HandleBackModel;
import org.springframework.web.bind.annotation.*;

/**
 * @author Surging
 * @version 1.0
 * @ClassName AutoProductAddController
 * @date 2022-06-27 17:06
 * @desc 阿里云物联网平台自动化产品添加控制层
 */
@RestController
@RequestMapping("/aliyun")
public class AutoProductAddController {

    private  final AutoProductAddHandler autoProductAddHandler;

    public AutoProductAddController(AutoProductAddHandler autoProductAddHandler) {
        this.autoProductAddHandler = autoProductAddHandler;
    }

    @GetMapping("/product")
    public DataResponse getProductTemplate() {
        HandleBackModel handleBackModel = autoProductAddHandler.getProductTemplate();
        return DataResponse.buildSuccess(handleBackModel);
    }

}
